#include "mesh.h"


Mesh::Mesh(  ) 
{
	vertNr = edgeNr = triaNr = 0;
}

void Mesh::addTriangle(Triangle *t)
{
	triangles.push_back( t );
	t->name = ++triaNr;
}
void Mesh::addEdge(Edge *e){
	edges.push_back( e );
	e->name = ++edgeNr;
}
void Mesh::addVertex(Vertex *v)
{
	vertices.push_back( v );
	v->name = ++vertNr;
}

QList<Vertex*> Mesh::getVertices(void) const
{
	return vertices;
}
QList<Edge*> Mesh::getEdges(void) const
{
	return edges;
}
QList<Triangle*> Mesh::getTriangles(void) const
{
	return triangles;
}

int Mesh::numberOfVertices()
{
	return vertNr;
}
int Mesh::numberOfEdges()
{
	return edgeNr;
}
int Mesh::numberOftriangles()
{
	return triaNr;
}

